package com;

public class Card {

	private Suit suit;
	private int rank;

	public Suit getSuit() {
		return suit;
	}

	public void setSuit(Suit suit) {
		this.suit = suit;
	}

	public int getRank() {
		return rank;
	}

	public void setRank(int rank) {
		if (rank == 1) {
			this.rank = 14;
		} else {
			this.rank = rank;
		}
	}

	@Override
	public boolean equals(Object obj) {
		Card card = (Card) obj;
		if (this.rank == card.getRank() && this.suit == card.getSuit()) {
			return true;
		}
		return false;
	}
}
